package com.inspur.dgov.bsp.user.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 区划信息
 *
 * @author chiyupei
 * @version 1.0
 * @since 1.0
 */
@Data
@TableName("pub_region")
@ApiModel(value="PubRegion对象", description="区划信息")
public class PubRegion implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId("ID")
    private Long id;

    @ApiModelProperty(value = "区划编码")
    @TableField("CODE")
    private String code;

    @ApiModelProperty(value = "区划名称")
    @TableField("NAME")
    private String name;

    @ApiModelProperty(value = "区划简称")
    @TableField("SHORT_NAME")
    private String shortName;

    @ApiModelProperty(value = "区划简码")
    @TableField("SHORT_CODE")
    private String shortCode;

    @ApiModelProperty(value = "上级区划ID")
    @TableField("PARENT_ID")
    private Long parentId;

    @ApiModelProperty(value = "区划属性(省、自治区:000、地州盟:001、副省级市:002、地级市:003、副省级市属区:004、地级市属区:005、县级市006、县:007、省直管:008、中央:009、直辖市:100、直辖市属区:101、直辖市辖区/县:102、街道办事处:201、乡镇:202、村:301、社区:302)")
    @TableField("REGION_LEVEL")
    private String regionLevel;

    @ApiModelProperty(value = "状态(1:有效 0:无效)")
    @TableField("STATUS")
    private String status;

    @ApiModelProperty(value = "排序")
    @TableField("SORT_ORDER")
    private Integer sortOrder;

    @ApiModelProperty(value = "备注")
    @TableField("REMARK")
    private String remark;

    @ApiModelProperty(value = "创建者ID")
    @TableField("CREATOR")
    private Long creator;

    @ApiModelProperty(value = "创建时间")
    @TableField("CREATE_TIME")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新者ID")
    @TableField("UPDATOR")
    private Long updator;

    @ApiModelProperty(value = "更新时间")
    @TableField("UPDATE_TIME")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "冗余字段1")
    @TableField("EXT_COL1")
    private String extCol1;

    @ApiModelProperty(value = "冗余字段2")
    @TableField("EXT_COL2")
    private String extCol2;


}
